var arr=[{name:'zs'},{name:'lisi'},{name:'wu'},]
arr.forEach(element => {
    element.w=400
    element.h=600
});
console.log(arr); 证明foreach会改变原来数组
/*
[ { name: 'zs', w: 400, h: 600 },
  { name: 'lisi', w: 400, h: 600 },
  { name: 'wu', w: 400, h: 600 } ]
*/